package com.swxy.club.dto.Vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.swxy.club.enums.Gender;
import com.swxy.club.serializer.EnumFlatSerializer;
import com.swxy.club.serializer.GenderDeserializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@ApiModel(value = "社团成员信息")
public class ClubMemberVO {
    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "真实姓名")
    private String realName;

    @JsonSerialize(using = EnumFlatSerializer.class)
    @JsonDeserialize(using = GenderDeserializer.class)
    private Gender gender;

    @ApiModelProperty(value = "社团角色")
    private String clubRole;

    @ApiModelProperty(value = "加入时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime joinTime;

    @ApiModelProperty(value = "头像")
    private String avatar;
}
